<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>添加员工</title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td height="25" align="center" valign="bottom" class="td06">
                <table width="98%" border="0" cellspacing="3" cellpadding="0">
                    <tr>
                        <td width="15"><img src="../../images/index_32.gif" width="9" height="9"></td>
                        <td valign="bottom" class="title">添加员工</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <form name="form1" method="post" action="" id="sta_value">
        <table width="95%" border="0" cellpadding="0" cellspacing="0">

            <tr>
                <td width="90" align="center" class="td_form01">员工姓名</td>
                <td colspan="3" class="td_form02"><input name="staname" type="text" class="input"></td>
            </tr>

            <tr>
                <td width="90" align="center" class="td_form01">员工性别</td>
                <td colspan="3" class="td_form02"><select  name="stasex">
                    <option>
                        男
                    </option>
                    <option>
                       女
                    </option>
                </select></td>
                </td>
            </tr>



            <tr>
                <td width="90" align="center" class="td_form01">员工年龄</td>
                <td colspan="3" class="td_form02"><input  name="staage" type="text" class="input"></td>
            </tr>


            <tr>
                <td width="90" align="center" class="td_form01">员工生日</td>
                <td colspan="3" class="td_form02"><input name="stabir" type="date" class="input"></td>
            </tr>

            <tr>
                <td width="90" align="center" class="td_form01">员工住址</td>
                <td colspan="3" class="td_form02"><input name="staaddress" type="text" class="input" id="address"></td>
            </tr>

            <tr>
                <td width="90" align="center" class="td_form01">员工电话</td>
                <td colspan="3" class="td_form02"><input name="statel" type="text" class="input"></td>
            </tr>


            <tr>
                <td width="90" align="center" class="td_form01">员工密码</td>
                <td colspan="3" class="td_form02"><input name="stapassword" type="password" class="input"></td>
            </tr>


            <tr>
                <td width="90" align="center" class="td_form01">所属科室</td>
                <td colspan="3" class="td_form02"><select name="deptype">
                    <option>外科</option>
                    <option>内科</option>
                    <option>耳鼻喉科</option>
                </select></td>
            </tr>
            <tr>
                <td width="90" align="center" class="td_form01">员工所在职位</td>
                <td colspan="3" class="td_form02">
                    <input type="checkbox" name="postitleList" value="1">医师
                    <input type="checkbox" name="postitleList" value="2">主任
                    <input type="checkbox" name="postitleList" value="3">药师
                </td>
            </tr>

        </table>
        <br>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td align="center"><input name="Submit" type="button" class="buttonface" value="  增加  " id="sb" >
                    <input name="Submit" type="button" class="buttonface" onClick="window.close()" value="  关闭  "></td>
            </tr>
        </table>
    </form>
</center>
</body>
</html>
<script src="../../bootstrap-3.3.7-dist/js/jquery-3.4.1.min.js"></script>
<script>


        $("#sb").on("click",function(){

            $.ajax({
                url: "/feign/staffinfo/add",
                type: "post",
                data: $("#sta_value").serialize(),
                // dataType: "json",
                headers: {
                    Accept: "application/json; charset=utf-8",
                    Authorization: location.href.split("=")[1]
                },
                success: function (data) {
                    if(data.code==200){
                        opener.location.href = "rolelist.htm?token="+location.href.split("=")[1];
                        window.close();
                    }
                }
            })
        })


</script>